CREATE PROCEDURE sp_user_registration (
	@Name VARCHAR(50),
	@Email VARCHAR(20),
	@Password nvarchar(20),
	@Dob DATETIME,
	@Gender VARCHAR(10),
	@Interest VARCHAR(100),
	@SecQues VARCHAR(50),
	@SecAns VARCHAR(50)
) AS
BEGIN
	INSERT INTO Users VALUES(@Name, @Email, @Password, @Dob, @Gender, @Interest, @SecQues, @SecAns)
END;


CREATE PROCEDURE sp_doctor_registration (
	@RegNo INT,
	@Name VARCHAR(50),
	@Email VARCHAR(50),
	@Password nvarchar(20),
	@Dob DATETIME,
	@Gender VARCHAR(10),
	@Spl VARCHAR(50),
	@degree VARCHAR(50)
	) AS
BEGIN
	INSERT INTO Doctors VALUES (@RegNo, @Name, @Email, @Password, @Gender, @Dob, @Spl, @degree)
END;

CREATE PROCEDURE sp_delete_doctor (
	@RegNo INT
	) AS
BEGIN
	DELETE FROM Doctors WHERE RegNo=@RegNo
END;

CREATE PROCEDURE sp_delete_user (
	@UserId INT
	) AS
BEGIN
	DELETE FROM Users WHERE UserId=@UserId
END;

sp_rename Detailz, sp_details